//
//  MHAuditInfoViewController.m
//  MiaoCircle
//
//  Created by 许正荣 on 2018/6/4.
//  Copyright © 2018年 acgera. All rights reserved.
//

#import "MHAuditInfoViewController.h"
#import "MHAuditInfoViewModel.h"

@interface MHAuditInfoViewController ()
@property(nonatomic, strong)  MHAuditInfoViewModel *viewModel;
@end

@implementation MHAuditInfoViewController
@dynamic viewModel;

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)bindViewModel
{
    [super bindViewModel];
    self.nameLabel.text = self.viewModel.circleMember.nickName;
    [self.headerImageView yy_setImageWithURL:[NSURL URLWithString:self.viewModel.circleMember.fullUserFace] placeholder:MHDefaultAvatar(MHDefaultAvatarTypeDefualt)];
    __weak __typeof(self)weakSelf = self;
    [self.passBtn bk_whenTapped:^{
        [weakSelf.viewModel.auditCommand execute: @1];
    }];
    
    [self.ignoreBtn bk_whenTapped:^{
        [weakSelf.viewModel.auditCommand execute: @3];
    }];
    if (self.viewModel.circleMember.info.length <= 0) {
        self.auditMessageLabel.text = [NSString stringWithFormat:@"哈喽~我是%@，我想加入你的圈子。",self.viewModel.circleMember.nickName];;
    }else
    {
        self.auditMessageLabel.text = self.viewModel.circleMember.info;
        
        self.auditMessageLabel.text = [NSString stringWithFormat:@"验证信息:%@",self.viewModel.circleMember.info];
    }
    
    
    
    
    
    
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
